package com.itboye.sunsunhome.util;

import com.itboye.sunsunhome.www.aq.R;

import android.content.Context;
import android.graphics.Bitmap;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;

public class AddDeviceBeansUtil {
	String name;
	ImageView img;
	ImageView imgadd;
	public ImageView getImg() {
		return img;
	}
	public void setImg(ImageView img) {
		this.img = img;
	}
	public ImageView getImgadd() {
		return imgadd;
	}
	public void setImgadd(ImageView imgadd) {
		this.imgadd = imgadd;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	

	
	public  class  AddDeviceAdapter extends BaseAdapter{

		Context context;
		AddDeviceBeansUtil util;
		public AddDeviceAdapter(Context context,AddDeviceBeansUtil util) {
			// TODO Auto-generated constructor stub
			this.context=context;
			this.util=util;
		}
		@Override
		public int getCount() {
			// TODO Auto-generated method stub
			return 6;
		}

		@Override
		public Object getItem(int position) {
			// TODO Auto-generated method stub
			return position;
		}

		@Override
		public long getItemId(int position) {
			// TODO Auto-generated method stub
			return position;
		}

		@Override
		public View getView(int position, View convertView, ViewGroup parent) {
			ViewHouder houder;
			if(convertView==null){
				houder=new ViewHouder();
				convertView=LayoutInflater.from(context).inflate(R.layout.item_add_device, null);
				houder.img1=(ImageView) convertView.findViewById(R.id.img1);
				houder.img2=(ImageView) convertView.findViewById(R.id.img2);
				houder.name=(TextView) convertView.findViewById(R.id.name);
				convertView.setTag(houder);
			}else{
				houder=(ViewHouder) convertView.getTag();
			}
			
//			houder.img1.setBackground(get)
			// TODO Auto-generated method stub
			return convertView;
		}
		class ViewHouder{
			ImageView img1,img2;
			TextView name;
		}
	}
}
